import DvaIndex from "DvaCommon";
import { EntityModelConfig } from 'Configs';

const config = EntityModelConfig('RightGroup');

config.actionList.push(get("getRightGroups", "ViewRightGroup?$select=RightGroupId,Name,DataRight,OperationRight,DataRightName,OperationRightName&$orderby CreateDate desc", "getRightGroups", "ViewRightGroup"));
config.actionList.push(get("getRightGroupMenus", "RightGroup/GetRightGroupMenus", "getRightGroupMenus", "RightGroup"));

function get(actionName, url, stateName, dataKey, isToken, hasToken) {
    return { actionName, url, method: "GET", stateName, dataKey, isToken, hasToken };
}

export default DvaIndex(config);
